import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
import router from "./router";
import { createPinia } from "pinia";
import VConsole from "vconsole";
import { isPC } from "./utils/zxcxWebkit";
import "@/utils/rem.js"
import "amfe-flexible";
import "amfe-flexible/index.js";
import { Lazyload } from 'vant';
import VueLuckyCanvas from '@lucky-canvas/vue'


const app = createApp(App);


if (import.meta.env.VITE_MODE == "development" && !isPC()) {
  const v = new VConsole({
    defaultPlugins: ["system", "network", "element", "storage"], // 启用核心功能模块
  });
  app.use(v);
}
app.use(router).use(createPinia()).use(Lazyload).use(VueLuckyCanvas);

app.use(Lazyload, {
  lazyComponent: true,
});

app.mount("#app");
